#ifndef ANALYSISWIDGET_H
#define ANALYSISWIDGET_H

#include <QWidget>
#include "qcustomplot.h"
#include "custombars.h"
namespace Ui {
class AnalysisWidget;
}

class AnalysisWidget : public QWidget
{
    Q_OBJECT

public:
    explicit AnalysisWidget(QWidget *parent = nullptr);
    ~AnalysisWidget();
    void initForm();

    void updataBar();
protected:
    //事件
    virtual void paintEvent(QPaintEvent *event);
    virtual void showEvent(QShowEvent *event);

signals:
    void sendDisWidget(QString );
private slots:
    void on_pushButton_2_clicked();

    void on_pushButton_1_clicked();

private:
    Ui::AnalysisWidget *ui;
    QCPBars *barBottom;
    QCPAxis *keyAxis;
    QCPAxis *valueAxis;
    CustomBars *fossil;
    QVector<double> m_vec;
    int rand;
    int m_num;
};

#endif // ANALYSISWIDGET_H
